package bairui.international.console.web.controller.wrap.category.properties;

import java.util.List;

import javax.validation.Valid;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lianjing.sh.spring.web.controller.base.action.Action;
import com.lianjing.sh.spring.web.controller.enhance.output.FomatOutput;

import bairui.international.model.domain.jpa.id.ID_ProductCategoryProperty;
import bairui.international.service.Service_ProductCategoryProperty_Generate;

/**
 *
 * 属性删除
 *
 * @generated
 * 
 * @see STest_C_Wrap_Category_PropertiesDelete_Deletes 测试
 *
 */
@Controller
public class C_Wrap_Category_PropertiesDelete_Deletes
 extends SC_Wrap_Category_PropertiesDelete_Deletes 
{
	
	@Autowired private Service_ProductCategoryProperty_Generate service_ProductCategoryProperty_Generate;
	
	/**
	 * 删除
	 */
	@Action(Deletes.class)
	@DeleteMapping(Deletes.RequestMappingValue)
	public @FomatOutput @ResponseBody Object deletes(
		@Valid Deletes.Input input, 
		@PathVariable(name=Deletes.PathVariableName.CategoryId) long categoryId
	) throws Exception {
		List<ID_ProductCategoryProperty> ids = input.getId();
		//
		service_ProductCategoryProperty_Generate.deleteByIds(ids);
		//
		return null;
	}
	

}
